<%--
  Created by IntelliJ IDEA.
  User: 刘瑶
  Date: 2020/5/4
  Time: 9:25
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>贡献区主页</title>
    <link rel="stylesheet" href="../css/spaces-contribute-main.css">
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript"src="../js/fenye.js"></script>
    <script type="text/javascript" src="../js/space-contribute-left.js"></script>
</head>

<body>
<!--**************顶部导航****************-->
<%@include file="../jsp/common/nav.jsp"%>
<!--**************左侧导航****************-->
<%@include file="../jsp/common/sidebar-scroll.jsp"%>
<!--***************空间右侧主界面*******************-->
<c:set var="user" value="${sessionScope.user}"/>
<c:set var="space" value="${sessionScope.space}"/>
<div class="right">
    <!--标题导航-->
    <div class="contribute-nav">
        <span class="contribute-nav-title"><a href="/index/main?id=${user.id}">学习空间</a></span>
        >
        <span class="contribute-nav-title"><a href="/index/space-main?space_id=${space.id}&name=${space.name}">${space.name}</a></span>
        >
        <span>贡献区</span>
    </div>
    <!--贡献区选择-->
    <div class="tab">
        <!--全部标签-->
        <div>
            <input type="radio" id="r-1" name="tab" checked>
            <label for="r-1" class="label-1">全部<span class="icon">${sessionScope.ContributeTotal}</span></label>
            <div class="mod-1">
                <c:forEach items="${contributelist}" var="list">

                    <div class="top">
                        <ul>
                            <li>
                                <div class="item">
                                    <span class="item-title"><a href="/contribute/space-contribute-show?id=${list.id}">${list.title}</a></span>
                                    <span class="item-writer"><a href="/users/user-dongtai?id=${user.id}">${username}</a></span>
                                </div>
                                <span class="time">
                                    <fmt:formatDate pattern="yyyy-MM-dd"
                                                    value="${list.createtime}" />
                                </span>
                            </li>
                        </ul>
                    </div>

                </c:forEach>
            </div>

        </div>
        <!--待接收标签-->
        <div>
            <input type="radio" id="r-2" name="tab">
            <label for="r-2" class="label-2">待解决<span class="icon">${list4}</span></label>
            <div class="mod-2">
                <c:forEach items="${contributelist}" var="list">
                    <c:if test="${list.status==3||list.status==4}">
                    <div class="top">
                        <ul>
                            <li>
                                <div class="item">
                                    <span class="item-title"><a href="/contribute/space-contribute-show?id=${list.id}">${list.title}</a></span>
                                    <span class="item-writer"><a href="/users/user-dongtai?id=${user.id}">${username}</a></span>
                                </div>
                                <span class="time">
                                    <fmt:formatDate pattern="yyyy-MM-dd"
                                                    value="${list.createtime}" />
                                </span>
                            </li>
                        </ul>
                    </div>
                    </c:if>
                </c:forEach>
            </div>
        </div>
        <!--未接受标签-->
        <div>
            <input type="radio" id="r-3" name="tab">
            <label for="r-3" class="label-3">未接受<span class="icon">${list3}</span></label>
            <div class="mod-3">
                <c:forEach items="${contributelist}" var="list">
                    <c:if test="${list.status==3}">
                    <div class="top">
                        <ul>
                            <li>
                                <div class="item">
                                    <span class="item-title">
                                        <a href="/contribute/space-contribute-show?id=${list.id}">${list.title}</a>
                                    </span>
                                    <span class="item-writer"><a href="/users/user-dongtai?id=${user.id}">${username}</a></span>
                                </div>
                                <span class="time">
                                    <fmt:formatDate pattern="yyyy-MM-dd"
                                                    value="${list.createtime}" />

                                </span>
                            </li>
                        </ul>
                    </div>
                </c:if>
                </c:forEach>
            </div>
        </div>
        <!--已接收标签-->
        <div>
            <input type="radio" id="r-4" name="tab">
            <label for="r-4" class="label-4">已接收<span class="icon">${list2}</span></label>
            <div class="mod-4">
                <c:forEach items="${contributelist}" var="list">
                    <c:if test="${list.status==2}">
                    <div class="top">
                        <ul>
                            <li>
                                <div class="item">
                                    <span class="item-title"><a href="/contribute/space-contribute-show?id=${list.id}">${list.title}</a></span>
                                    <span class="item-writer"><a href="/users/user-dongtai?id=${user.id}">${username}</a></span>
                                </div>
                                <span class="time">
                                    <fmt:formatDate pattern="yyyy-MM-dd"
                                                    value="${list.createtime}" />
                                </span>
                            </li>
                        </ul>
                    </div>
                    </c:if>
                </c:forEach>
            </div>
        </div>
    </div>
    <!--***************分页****************-->
    <div class="page">
        <ul>
            <li class="page_li">
                <a class="page_btn"id="prePage" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${currentPage-1}">
                    <
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn1" href="${pageContext.request.contextPath}/contribute/space-contribute?page=1">
                    1
                </a>
            </li>
            <li class="page_li"> <span class="pages_span" id="prePoint">...</span> </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn2" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${currentPage-2}">
                    ${currentPage-2}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn3" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${currentPage-1}">
                    ${currentPage-1}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn4" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${currentPage}">
                    ${currentPage}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn5" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${currentPage+1}">
                    ${currentPage+1}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn6" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${currentPage+2}">
                    ${currentPage+2}
                </a>
            </li>
            <li class="page_li"> <span class="pages_span" id="sufPoint">...</span> </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn7" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${pageTotal}">
                    ${pageTotal}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="sufPage" href="${pageContext.request.contextPath}/contribute/space-contribute?page=${currentPage+1}">
                    >
                </a>
            </li>
        </ul>
    </div>
</div>
</body>
</html>
